﻿using System;
using System.ComponentModel;
namespace BaMusaSoft.RPS.DataModel
{
    [Serializable]
    public class ScheduleDetail : INotifyPropertyChanged
    {
        public int DetailsId { get; set; }

        public string ScheduleId { get; set; }

        private string _dateDue;
        public string DateDue
        {
            get
            {
                return _dateDue;
            }
            set
            {
                _dateDue = value;
                OnPropertyChanged("DateDue");
            }
        }
        private int _amountDue;
        public int AmountDue
        {
            get
            {
                return _amountDue;
            }
            set
            {
                _amountDue = value;
                OnPropertyChanged("AmountDue");
            }
        }
        private int _amountPaid;
        public int AmountPaid
        {
            get
            {
                return _amountPaid;

            }
            set
            {
                _amountPaid = value;
                OnPropertyChanged("AmountPaid");
            }
        }
        private int _balance;
        public int Balance
        {
            get
            {
                return _balance;
            }
            set
            {
                _balance = value;
                OnPropertyChanged("Balance");
            }
        }
        private string _remarks;
        public string Remarks
        {
            get
            {
                return _remarks;
            }
            set
            {
                _remarks = value;
                OnPropertyChanged("Remarks");
            }
        }
        private bool _discountAmount;
        public bool DiscountAmount
        {
            get
            {
                return _discountAmount;
            }
            set
            {
                _discountAmount = value;
                OnPropertyChanged("DiscountAmount");
            }
        }

        public Schedule Schedule { get; set; }

        #region "INotfiyPropertyChanged members"
        [field:NonSerialized]
        public event PropertyChangedEventHandler PropertyChanged;
        void OnPropertyChanged(string propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        #endregion

    }
}